<?php

use Illuminate\Routing\Router;
use Illuminate\Support\Facades\Route;
use Dcat\Admin\Admin;

Admin::routes();

//楼盘管理
Route::prefix('building')->group(function (){
    Route::get('catch', 'App\Admin\Controllers\BuildingController@resources');
});


Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => config('admin.route.namespace'),
    'middleware'    => config('admin.route.middleware'),
], function (Router $router) {
    $router->get('/', 'HomeController@index');
    //后台切换城市
    $router->post('change', 'HomeController@changeCity');
    //后台城市三级联动
    $router->get('city', 'CityController@city');
    $router->get('region', 'CityController@region');
    //后台楼盘户型联动
    $router->get('type', 'BuildingController@types');
    //楼盘管理
    $router->resource('building','BuildingController');
    //新房管理
    $router->resource('house/new','NewHouseController');
    //团购管理
    $router->resource('pinkConfig','PinkConfigController');
    //经纪人管理
    $router->resource('agent', 'AgentController');
//    //审核功能
//    $router->resource('buildingExamine', 'BuildingExamineController');
    //审核
    $router->get('examine','UserReleaseController@examine');
    //快捷入口
    $router->resource('quick/entrance', 'QuickEntranceController');
    //后台配置
    $router->resource('config', 'ConfigController');
    //订单
    $router->resource('order', 'OrderController');
    //用户发布
    $router->resource('userRelease', 'UserReleaseController');
    //二手房管理
    $router->resource('house/second','SecondHandHouseController');
    //资讯管理
    $router->resource('news', 'NewsController');
    //前台轮播图
    $router->resource('slideshow','SlideshowController');
    //用户管理
    $router->resource('wxUser','WxUserController');
    //直播间管理
    $router->resource('live','LiveController');
    //直播流管理
    $router->resource('liveStream','LiveStreamController');
    //直播回放
    $router->resource('livePlayback','LivePlaybackController');
});


